Optimal. Leaf size=96 \[ b \sqrt {-c+d x} \sqrt {c+d x}-\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{2 x^2}-\frac {\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 114, normalized size of antiderivative = 1.19, number of steps
used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {465, 103, 12,
94, 211} \begin {gather*} -\frac {\left (2 b c^2-a d^2\right ) \text {ArcTan}\left (\frac {\sqrt {d x-c} \sqrt {c+d x}}{c}\right )}{2 c}+\frac {1}{2} \sqrt {d x-c} \sqrt {c+d x} \left (2 b-\frac {a d^2}{c^2}\right )+\frac {a (d x-c)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 94
Rule 103
Rule 211
Rule 465
Rubi steps
\begin {align*} \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx &=\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \int \frac {\sqrt {-c+d x} \sqrt {c+d x}}{x} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (-2 b+\frac {a d^2}{c^2}\right ) \int \frac {c^2}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (-2 b c^2+a d^2\right ) \int \frac {1}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}-\frac {1}{2} \left (d \left (2 b c^2-a d^2\right )\right ) \text {Subst}\left (\int \frac {1}{c^2 d+d x^2} \, dx,x,\sqrt {-c+d x} \sqrt {c+d x}\right )\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}-\frac {\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.18, size = 74, normalized size = 0.77 \begin {gather*} \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (-a+2 b x^2\right )}{2 x^2}+\left (-2 b c+\frac {a d^2}{c}\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(181\) vs.
\(2(80)=160\).
time = 0.32, size = 182, normalized size = 1.90
method | result | size |
risch | \(\frac {a \left (-d x +c \right ) \sqrt {d x +c}}{2 x^{2} \sqrt {d x -c}}-\frac {\left (-b \sqrt {\left (d x -c \right ) \left (d x +c \right )}+\frac {\ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) a \,d^{2}}{2 \sqrt {-c^{2}}}-\frac {\ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) b \,c^{2}}{\sqrt {-c^{2}}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) | \(178\) |
default | \(-\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) a \,d^{2} x^{2}-2 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) b \,c^{2} x^{2}-2 b \,x^{2} \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}+\sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {-c^{2}}\, a \right )}{2 \sqrt {d^{2} x^{2}-c^{2}}\, x^{2} \sqrt {-c^{2}}}\) | \(182\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 98, normalized size = 1.02 \begin {gather*} b c \arcsin \left (\frac {c}{d {\left | x \right |}}\right ) - \frac {a d^{2} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{2 \, c} + \sqrt {d^{2} x^{2} - c^{2}} b - \frac {\sqrt {d^{2} x^{2} - c^{2}} a d^{2}}{2 \, c^{2}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} a}{2 \, c^{2} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.39, size = 85, normalized size = 0.89 \begin {gather*} -\frac {2 \, {\left (2 \, b c^{2} - a d^{2}\right )} x^{2} \arctan \left (-\frac {d x - \sqrt {d x + c} \sqrt {d x - c}}{c}\right ) - {\left (2 \, b c x^{2} - a c\right )} \sqrt {d x + c} \sqrt {d x - c}}{2 \, c x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b x^{2}\right ) \sqrt {- c + d x} \sqrt {c + d x}}{x^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 157, normalized size = 1.64 \begin {gather*} \frac {\sqrt {d x + c} \sqrt {d x - c} b d + \frac {{\left (2 \, b c^{2} d - a d^{3}\right )} \arctan \left (\frac {{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}}{2 \, c}\right )}{c} + \frac {2 \, {\left (a d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 4 \, a c^{2} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{2}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.89, size = 584, normalized size = 6.08 \begin {gather*} b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )-\frac {\frac {a\,\sqrt {-c}\,d^2}{32\,c^{3/2}}+\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{16\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {15\,a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}}-b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )+\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {8\,b\,\sqrt {-c}\,\sqrt {c}\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2\,\left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________